package org.taotao.manager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.taotao.commons.exception.TaotaoBizException;
import org.taotao.manager.mapper.ItemCatMapper;
import org.taotao.manager.pojo.ItemCat;
import org.taotao.manager.service.ItemCatService;

@Service
public class ItemCatServiceImpl implements ItemCatService {
	
	@Autowired
	private ItemCatMapper itemCatMapper;
	
	@Override
	public List<ItemCat> getItemCatByParentId(long id) {
		try {
			return itemCatMapper.selectByParentId(id);
		} catch (Exception e) {
			throw new TaotaoBizException("查询类目树出错", e);
		}
	}

}
